/*根据类别获取图片工具*/

function getJokeList(type,page,callback) {

  var weApi;
  weApi = "https://m2.qiushibaike.com/article/list/"+type +"?type=refresh" + 
  "&page="+page 

  //发送请求加载信息
  wx.request({
    url: weApi,
    success: function (res) {
      var hw = res.data;
      callback && callback(hw);
    }
  })
}
function getCommentsById(id,count,page,callback) {

  var weApi;
  weApi=`http://m2.qiushibaike.com/article/${id}/comments?count=${count}&page=${page}`
  //发送请求加载信息
  wx.request({
    url: weApi,
    success: function (res) {
      var hw = res.data;
      callback && callback(hw);
    }
  })
}

//设置导出信息
module.exports = {
  getJokeList,
  getCommentsById
};

